MATLAB help!

Kinja'd!!! "TheHondaBro" (wwaveform)
01/17/2017 at 22:17 • Filed to: None

Kinja'd!!!0 Kinja'd!!! 25

Long story short, my “programming prep” course threw me into MATLAB so hard I hit the ground and bounced.

Anyway, I need to create a 1200 x 1200 matrix of zeros with the value 75 on the minor diagonal.

Help!


DISCUSSION (25)


Kinja'd!!! TrustMeImAnEngineer, but I'd rather be an InternationalArtThief > TheHondaBro
01/17/2017 at 22:24

Kinja'd!!!0

How clean does the code need to be?


Kinja'd!!! bob and john > TheHondaBro
01/17/2017 at 22:24

Kinja'd!!!3

“MATLAB”

Kinja'd!!!

Kinja'd!!!

Kinja'd!!!

Kinja'd!!!

Kinja'd!!!

Kinja'd!!!

Kinja'd!!!

Kinja'd!!!


Kinja'd!!! sm70- why not Duesenberg? > TheHondaBro
01/17/2017 at 22:24

Kinja'd!!!2

Did you try turning it off and then turning it back on again?


Kinja'd!!! TheHondaBro > TrustMeImAnEngineer, but I'd rather be an InternationalArtThief
01/17/2017 at 22:26

Kinja'd!!!0

I really don’t care. As long as it can help me understand arbitrary matrices better.


Kinja'd!!! TrustMeImAnEngineer, but I'd rather be an InternationalArtThief > TheHondaBro
01/17/2017 at 22:32

Kinja'd!!!3

A = flip(75*eye(1200)); *Edited because I had my test dimension of 5 in here at first

As clean as I can get it in one line.

“eye” creates the identity matrix of ones on the diagonal and zeros everywhere else. multiplying by 75 is self explanatory, and flip flips the rows vertically (1st row becomes last, last is first, etc..)


Kinja'd!!! Dr. Zoidberg - RIP Oppo > TheHondaBro
01/17/2017 at 22:32

Kinja'd!!!0

You shouldn’t be handling minors anyway.


Kinja'd!!! TheHondaBro > TrustMeImAnEngineer, but I'd rather be an InternationalArtThief
01/17/2017 at 22:36

Kinja'd!!!1

You are my own personal Jesus Christ.


Kinja'd!!! TheHondaBro > Dr. Zoidberg - RIP Oppo
01/17/2017 at 22:36

Kinja'd!!!1

Better them being sober than your drunken minors. You sicken me, crustacean.


Kinja'd!!! TrustMeImAnEngineer, but I'd rather be an InternationalArtThief > TheHondaBro
01/17/2017 at 22:41

Kinja'd!!!1

I just have to live up to my username. Now to steal something from the Louvre...


Kinja'd!!! unclevanos (Ovaltine Jenkins) > TheHondaBro
01/17/2017 at 22:46

Kinja'd!!!1

MATLAB is a poo.

I can’t help you there my coding is pure shit.


Kinja'd!!! FTTOHG Has Moved to https://opposite-lock.com > TrustMeImAnEngineer, but I'd rather be an InternationalArtThief
01/17/2017 at 22:49

Kinja'd!!!0

This is as clean as it gets. I spend probably 33% of my life in MATLAB and can’t think of a better way.


Kinja'd!!! scoob > TheHondaBro
01/17/2017 at 23:16

Kinja'd!!!1

Kinja'd!!!


Kinja'd!!! Dr. Zoidberg - RIP Oppo > TheHondaBro
01/17/2017 at 23:21

Kinja'd!!!0

Hey I provide safe haven for those drunk children. What charitable act have YOU done lately? Other than save my life that one time.


Kinja'd!!! TheHondaBro > Dr. Zoidberg - RIP Oppo
01/17/2017 at 23:21

Kinja'd!!!0

I told inner-city rapscallions to stay in school and don’t do drugs.


Kinja'd!!! Dr. Zoidberg - RIP Oppo > TheHondaBro
01/17/2017 at 23:22

Kinja'd!!!0

Did you tell them to stay in PUBLIC schools, though? They’re all doomed.


Kinja'd!!! TheHondaBro > Dr. Zoidberg - RIP Oppo
01/17/2017 at 23:35

Kinja'd!!!0

I told them to stay out of God’s Kingdom.


Kinja'd!!! Dr. Zoidberg - RIP Oppo > TheHondaBro
01/17/2017 at 23:38

Kinja'd!!!0

Burger King?


Kinja'd!!! TheHondaBro > Dr. Zoidberg - RIP Oppo
01/17/2017 at 23:42

Kinja'd!!!0

*is making reference to da concourse post*


Kinja'd!!! Dr. Zoidberg - RIP Oppo > TheHondaBro
01/17/2017 at 23:45

Kinja'd!!!1

hashtag not my god dot png


Kinja'd!!! tromoly > TheHondaBro
01/17/2017 at 23:46

Kinja'd!!!0

How convenient, someone else currently working in MatLab. High five?


Kinja'd!!! TheHondaBro > tromoly
01/17/2017 at 23:47

Kinja'd!!!0

Too angery to high five.


Kinja'd!!! Shoop > TheHondaBro
01/17/2017 at 23:52

Kinja'd!!!0

I learned this then promptly forgot it


Kinja'd!!! NYankee1927 > TrustMeImAnEngineer, but I'd rather be an InternationalArtThief
01/18/2017 at 09:28

Kinja'd!!!0

If this is being graded, the instructor is going to know this isn’t his own work. In the beginning it’s for loops or nothing for making matrices!


Kinja'd!!! jimz > TheHondaBro
01/18/2017 at 11:36

Kinja'd!!!1

ah, MATLAB. I have a small program written in it which will generate biquad coefficients in both S- and Z-domain. It’s a nice, small, 6 MB application.

Which needs the 800 MB MATLAB compiler runtime in order to be usable. The only one worse than Mathworks is National Instruments.


Kinja'd!!! e_is_real_i_isnt > jimz
01/20/2017 at 19:58

Kinja'd!!!0

Want fun? Try R.